import { defineStore } from "pinia";
import { post } from "../utils/common/api";
let usePermissionStore = defineStore('permission',{
  //存储用户身份系统权限的数组
  state: () => ({
    id: undefined,
    systemPermission: [],
  }),
  actions: {
    getPermissionList() {
      let that = this
      post('/user/permission/list',{}).then(res => {
        that.systemPermission = res.list
      })
    },
  },
  persist: true,
})

export default usePermissionStore